<template>
  <ph-view>
    <ph-divider>基本介绍</ph-divider>
    <ph-pretty>{{ baseUsage }}</ph-pretty>
    <ph-button @click="onClick">打开toast</ph-button>
    <ph-pretty>{{ demo1 }}</ph-pretty>
  </ph-view>
</template>
<script lang="ts">
import { defineComponent, getCurrentInstance } from "vue";
import { PhDivider, PhButton, PhView } from "@/index";
import * as Data from "../data/toast";
export default defineComponent({
  components: { PhDivider, PhButton, PhView },
  setup() {
    const ins = getCurrentInstance();
    const onClick = () => ins?.proxy?.$phToast("我爱你，中国");
    return { onClick, ...Data };
  },
});
</script>
